/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proyecto3;

import app.Com;
import app.Parameters;

/**
 *
 * @author Ulil Cojti, Maria Fernanda Martinez, Adrian Martinez
 */
public class Serial {
   Parameters settings;
   Com com1;
   
    /**
     *
     * @param nombre
     * @throws Exception
     */
    public void iniciar(String nombre) throws Exception{
        // Settings parameters COM1.
        settings = new Parameters();
        settings.setPort(nombre);
        settings.setBaudRate("9600");
        //Instance COM1.
        com1 = new Com(settings);  
   }
    
    /**
     *
     * @param 
     * @throws Exception
     */
    public void send(int a) throws Exception{
        //Write COM1.
        com1.sendSingleData(a);
        Thread.sleep(1);
   }
   public void send_path(String path) throws Exception{
        
   }

}
